package com.ziyun.erp.modules.order.utils;

import com.ziyun.erp.common.utils.HttpClientUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * 订单分配
 * @author gaosheng
 * @date 2018-10-25 13:35
 */
public class OrderAllotUtil {

    /**
     * 192.168.1.52 本地
     * 120.27.237.180 测试
     */

    private static Logger logger = LoggerFactory.getLogger(OrderAllotUtil.class);

    /**
     * 找工厂
     * @param jsonParam
     * @return
     */
    public static String findQuoteResult(String jsonParam){
        logger.info("order allot findQuoteResult param：" + jsonParam);
        String result = HttpClientUtil.doPostJson("http://120.27.237.180:9100/goods/getGoodsForOrderErp", jsonParam);
        logger.info("order allot findQuoteResult result：" + jsonParam);
        return result;
    }

    /**
     * 分配订单
     * @param jsonParam
     * @return
     */
    public static String allotQuoteResult(String jsonParam){
        logger.info("order allot allotQuoteResult param：" + jsonParam);
        String result = HttpClientUtil.doPostJson("http://120.27.237.180:9300/erp/allotFactoryOrder", jsonParam);
        logger.info("order allot allotQuoteResult result：" + result);
        return result;
    }

}
